using System;

using Pegasus.Diagnostics;
using Pegasus.Workflow.Service;

namespace Pegasus.UnitTests.Workflow.Service.Workflows
{
	/// <summary>
	/// Testing event args
	/// </summary>
	[Serializable]
	public class TestingEventArgs : WorkflowEventArgs
	{
		// Local Instance Values
		private int m_anotherValue;

		/// <summary>
		/// Initializes a new instance of the <see cref="TestingEventArgs"/> class.
		/// </summary>
		/// <param name="workflowId">The workflow id.</param>
		/// <param name="anotherValue">Another value.</param>
		public TestingEventArgs( int workflowId, int anotherValue, bool deliverToCurrentStateOnly )
			: base( workflowId, deliverToCurrentStateOnly )
		{
			// Check Parameters
			ParamCode.AssertRange( workflowId, 1, int.MaxValue, "workflowId" );
			ParamCode.AssertRange( anotherValue, 0, int.MaxValue, "anotherValue" );
			// deliverToCurrentStateOnly bool value

			m_anotherValue = anotherValue;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="T:TestingEventArgs"/> class.
		/// </summary>
		/// <param name="workflowId"></param>
		public TestingEventArgs( int workflowId, int anotherValue ) 
			: base( workflowId )
		{
			// Check Parameters
			ParamCode.AssertRange( workflowId, 1, int.MaxValue, "workflowId" );
			ParamCode.AssertRange( anotherValue, 0, int.MaxValue, "anotherValue" );

			m_anotherValue = anotherValue;
		}

		/// <summary>
		/// Gets another value.
		/// </summary>
		/// <value>Another value.</value>
		public int AnotherValue
		{
			get
			{
				return m_anotherValue;
			}
		}
	}
}
